/**
 * 修改接口
 */
const { updatesFn } = require("../mysql.js")
const express = require("express")
const updates = express.Router()

updates.put("/puts", (req, res) => {
    console.log(req.body);
    let sql = "update xz_user set ? where uid = ?"
    updatesFn(sql,req.body,req.body.uid).then(rest => {
        res.send({
            code:200,
            message:'修改成功'
        })
    }).catch(err => {
        console.log(err);
        res.send({
            code:201,
            message:'修改失败'
        })
    })

})

module.exports = {
    updates
}